<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>渐变</title>
	<style>
		.box1{
			width:200px;
			height:200px;
			/*
				linear-gradient:线性渐变
				linear-gradient(red,yellow),红色开头，黄色中尾部，中间是过度
				可以设置渐变的方向：
					to right
					to left
					to top
					to bottom
					xxxdeg deg表示度数
			*/
			background-image:linear-gradient(to right,red,yellow);
		}
	</style>
</head>
<body>
	<div class="box1">
	</div>
</body>
</html>